import {
  BadRequestException,
  Injectable,
  NotFoundException,
} from '@nestjs/common';
import { CreateNormalUserDto } from '../user/dto/create-normal-user.dto';
import * as argon2 from 'argon2';
import { LoginDto } from '../user/dto/login-dto';
import { UserService } from '../user/user.service';

@Injectable()
export class AuthService {
  constructor(private readonly userService: UserService) {}
  async register(createUserDto: CreateNormalUserDto) {
    return await this.userService.register(createUserDto);
  }

  async login({ username, password }: LoginDto) {
    return await this.userService.login({ username, password });
  }
}
